doc: Storage factory explanation on withStorageSync()#141
Closed
DJREMiX6 wants to merge 1 commit intoangular-architects:mainfrom
Closed
doc: Storage factory explanation on withStorageSync()#141DJREMiX6 wants to merge 1 commit intoangular-architects:mainfrom
DJREMiX6 wants to merge 1 commit intoangular-architects:mainfrom
Conversation
I added an example that explains how you can use the storage factory to inject a service to be used as a different storage system rather than the LocalStorage or SessionStorage. The use case was that i wanted to sync the state in a way that was not reachable and updateable by the user so i created a Storage implementation which holds everything in memory, every time you destroy a component in which the state is provided and you recreate it, the state is synced with that in memory Storage and the user will not be able to read it or change it.
Collaborator
|
Is it possible to merge that after #134? |
Author
Sure is! Should I wait for it to be merged and rebase or will you do it? |
Collaborator
|
A quick update here. We have in the meantime the indexeddb support, but I'd like to modify it so that we have minimal changes, i.e. get rid of async from synchronous stores (local & session storage). |
Collaborator
|
@DJREMiX6, has been a while but the indexeddb support is now available. The documentation has also been updated. If you think your PR could improve the docs, please re-open it. Closing it for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I added an example that explains how you can use the storage factory to inject a service to be used as a different storage system rather than the LocalStorage or SessionStorage.
The use case was that i wanted to sync the state in a way that was not reachable and updateable by the user so i created a Storage implementation which holds everything in memory, every time you destroy a component in which the state is provided and you recreate it, the state is synced with that in memory Storage and the user will not be able to read it or change it.